/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Army.building;

/**
 *
 * @author Alvis
 */
public class BuildingFactory {

	public BuildingFactory() {
	}

	public static Building createBuilding(String type, int team, int x, int y) {
		Building tower = null;
		switch (type) {
			case "barrack":
				tower = new BuildingBarrack(team, x, y);
				break;
			case "castle":
				tower = new BuildingCastle(team, x, y);
				break;
			case "house":
				tower = new BuildingHouse(team, x, y);
				break;
			case "mine":
				tower = new BuildingMine(team, x, y);
				break;
			case "tower":
				tower = new BuildingTower(team, x, y);
				break;
		}
		return tower;

	}
/*
	public static Building createBuilding(Building building, int team, int x, int y) {

		return (Building) building.create(team, x, y);

	}*/
}
